home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 January: Mac OS SDK / Dev.CD Jan 96 SDK / Dev.CD Jan 96 SDK1.toast / Development Kits (Disc 1) / AOCE / Development Tools / Sample Code / Catalog Service Access Module / DTS Sample CSAM / Src / DTSSampleCSAM.r < prev    next >
Encoding:
Text File  |  1993-11-02  |  4.0 KB  |  163 lines  |  [TEXT/KAHL]

  1. /*
  2.  * DTSSampleCSAM.r
  3.  * Copyright © 1992-93 Apple Computer Inc. All Rights Reserved.
  4.  */
  5.  
  6. #include "Types.r"
  7. #include "SysTypes.r"
  8. #include "OCE.r"
  9. #include "DTSSampleCSAM.h"
  10.  
  11. /*
  12.  * The MPW MakeFile defines Think_Rez as zero. This is used
  13.  * to build either the final MPW-version of the CSAM or the
  14.  * Think C project resource file for the Think version.
  15.  * See ReadMeForThinkC.c for details.
  16.  */
  17. #ifndef Think_Rez
  18. #define Think_Rez    1
  19. #endif
  20.  
  21. /*
  22.  * These definitions are needed for all resource components.
  23.  */
  24.  
  25. /*
  26.  *
  27.  * kTemplateName        "DTS Sample CSAM" -- this is used
  28.  *                        to define resource names and the
  29.  *                        names of some strings. You should
  30.  *                        change it to something suitable for
  31.  *                        your application.
  32.  * kIconResourceFile    "DTS Sample Icons" -- this is the path
  33.  *                        to a file containing the icon suite.
  34.  *                        This lets you edit icons in ResEdit.
  35.  * kTemplateCodeFile    "::DTSSampleTemplate.code" -- the name of
  36.  *                        the file containing the template code resource.
  37.  * kCSAMCreatorID        The creator id (registered with DTS) for your CSAM
  38.  *                        This is used in the C code to access the Audit
  39.  *                        logging record.
  40.  *
  41.  * The following definitions are needed for the 'vers' resource. They
  42.  * may also be useful to configure code that is release-specific (for
  43.  * example, you can configure test code with #if kReleaseStage == 'd'
  44.  *
  45.  * kMajorVersion        These four symbols are used to configure the
  46.  * kMinorVersion        release number in the 'vers' resource. For
  47.  * kReleaseStage        example "1.2d3" is defined by major = 1,
  48.  * kPreReleaseNumber    minor = 2, stage = 'd', pre-release  = 3
  49.  * kReleaseVersion        The release stage as a text string.
  50.  * kCopyrightString        The applicable copyright string.
  51.  */
  52.  
  53. /*
  54.  * kCSAMCreatorID is the creator ID, registered with DTS, for the CSAM. Note that
  55.  * it is also needed by the Makefile to set the actual file creator. Also, the Audit
  56.  * library uses the creator id to define the logging record. Normally, the creator
  57.  * id is defined by a -d operator in the Makefile's Rez command.
  58.  *
  59.  * kCSAMCreatorIDString is the creator ID as a string. This is needed to concatenate
  60.  * the creator id onto certain strings (actually, RStrings) that must be unique among
  61.  * all templates and resources.
  62.  */
  63. #ifndef kCSAMCreatorID
  64. #define kCSAMCreatorID                    'Pdsm'
  65. #endif
  66. #undef kCSAMCreatorID
  67. #define kCSAMCreatorID                    'Pdsm'
  68.  
  69. /*
  70.  * This is your creator id as a normal string
  71.  */
  72. #ifndef Think_Rez
  73. /*
  74.  * This gets a syntax error on Think Rez
  75.  */
  76. #if kCSAMCreatorID != 'Pdsm'
  77.         << error, the following won't work >>
  78. #endif
  79. #endif
  80. #define kCSAMCreatorIDString            "Pdsm"
  81.  
  82. /*
  83.  * kCopyrightText is the standard copyright text.
  84.  */
  85. #define kCopyrightText                    "© 1992-93 Apple Computer Inc."
  86.  
  87. /*
  88.  * Include the components that do the work.
  89.  */
  90. #include "DTSSampleCSAMDriver.r"
  91. #include "DTSSampleCSAMTemplate.r"
  92.  
  93. /*
  94.  * FREF/BNDL stuff
  95.  */
  96. resource 'BNDL' (
  97.             kCSAMAspect + kDETAspectMainBitmap,
  98.             kTemplateName,
  99.             purgeable
  100.         ) {
  101.     kCSAMCreatorID,
  102.     0,                            /* Version            */
  103.     {
  104.         'FREF', { 0, kCSAMAspect + kDETAspectMainBitmap    },
  105.         'ICN#', { 0, kCSAMAspect + kDETAspectMainBitmap    }
  106.     }
  107. };
  108.  
  109. resource 'FREF' (
  110.             kCSAMAspect + kDETAspectMainBitmap,
  111.             kTemplateName,
  112.             purgeable
  113.         ) {
  114.     'dash', 0, ""
  115. };
  116.  
  117. type kCSAMCreatorID as 'STR ';
  118.  
  119. resource kCSAMCreatorID (0, "", purgeable) {
  120.     kTemplateName " " kReleaseVersionString " " kCopyrightText
  121.     ", All Rights Reserved"
  122. #if Think_Rez
  123.     " (Think)"
  124. #else
  125.     " (MPW)"
  126. #endif
  127.     " ($$Date)"
  128. };
  129.  
  130. resource 'vers' (1, "", purgeable) {
  131.     kMajorVersion,
  132.     kMinorVersion,
  133.     kReleaseStage,
  134.     kPreReleaseNumber,
  135.     verUS,
  136.     kReleaseVersionString,
  137.     kReleaseVersionString " " kCopyrightText
  138. #ifdef Think_Rez
  139.         " (Think)"
  140. #else
  141.         $$format(" (%4d.%02d.%02d)", $$year, $$month, $$day)
  142. #endif
  143. };
  144.  
  145. resource 'vers' (2, "", purgeable) {
  146.     kMajorVersion,
  147.     kMinorVersion,
  148.     kReleaseStage,
  149.     kPreReleaseNumber,
  150.     verUS,
  151.     kReleaseVersionString,
  152.     "For AOCE 1.0"
  153. };
  154.  
  155. /*
  156.  * Finder Get Info Resource (Inside Mac VI, 9-22)
  157.  */
  158. resource 'STR ' (-16397, "", purgeable) {
  159.     "This document contains the \"" kTemplateName
  160.     "\" Catalog Service Access Module (CSAM)."
  161.     " It cannot be opened."
  162. };
  163.